package com.snail.poker.model;

import java.util.Date;

import org.apache.struts2.json.annotations.JSON;

import com.snail.poker.uitls.Constant;
import com.snail.poker.uitls.DateUtil;

/**
 * 移动设备
 * 
 * @author Snail
 * 
 */
public class Equipment {
	private int equipmentSn;
	/**
	 * 移动设备的MAC地址
	 */
	private String macAddress;
	/**
	 * 移动设备系统的版本号
	 */
	private String version;
	/**
	 * 移动设备型号
	 */
	private String model;
	/**
	 * 移动设备的序列号
	 */
	private String serial;
	/**
	 * 移动设备的IMEI编号
	 */
	private String imei;
	/**
	 * 移动设备的ICCID
	 */
	private String iccid;
	/**
	 * 在线，离线，休眠状态
	 */
	private int status;
	/**
	 * 登出时间
	 */
	private Date logoutTime;
	/**
	 * 登录时间，即记录创建时间
	 */
	private Date createTime;
	/**
	 * 登录IP地址
	 */
	private String createIp;

	public Equipment() {
		super();
		// TODO Auto-generated constructor stub
		this.equipmentSn = 0;
		this.macAddress = "";
		this.version = "";
		this.model = "";
		this.serial = "";
		this.imei = "";
		this.iccid = "";
		this.status = Constant.STATUS_OFFLINE;
		this.createTime = DateUtil.getCurrDate();
		this.logoutTime = DateUtil.getCurrDate();
		this.createIp = "127.0.0.1";
	}

	public Equipment(int equipmentSn, String macAddress, String version,
			String model, String serial, String imei, String iccid, int status,
			Date logoutTime, Date createTime, String createIp) {
		this();
		this.equipmentSn = equipmentSn;
		this.macAddress = macAddress;
		this.version = version;
		this.model = model;
		this.serial = serial;
		this.imei = imei;
		this.iccid = iccid;
		this.status = status;
		this.logoutTime = logoutTime;
		this.createTime = createTime;
		this.createIp = createIp;
	}

	public int getEquipmentSn() {
		return equipmentSn;
	}

	public void setEquipmentSn(int equipmentSn) {
		this.equipmentSn = equipmentSn;
	}

	public String getMacAddress() {
		return macAddress;
	}

	public void setMacAddress(String macAddress) {
		this.macAddress = macAddress;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public String getSerial() {
		return serial;
	}

	public void setSerial(String serial) {
		this.serial = serial;
	}

	public String getImei() {
		return imei;
	}

	public void setImei(String imei) {
		this.imei = imei;
	}

	public String getIccid() {
		return iccid;
	}

	public void setIccid(String iccid) {
		this.iccid = iccid;
	}

	@JSON(format = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateIp() {
		return createIp;
	}

	public void setCreateIp(String createIp) {
		this.createIp = createIp;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	@JSON(format = "yyyy-MM-dd HH:mm:ss")
	public Date getLogoutTime() {
		return logoutTime;
	}

	public void setLogoutTime(Date logoutTime) {
		this.logoutTime = logoutTime;
	}
}
